package org.example.adapter.objadapter;

/**
 * @author
 * @description  手机充电
 */
public class Phone {

    private static final int VOLTAGE = 5; //5伏电压

    public void charging(IVoltage5V iVoltage5V) {
        if (iVoltage5V.output5V() == VOLTAGE) {
            System.out.println("电压为5V，可以充电");
        } else {
            System.out.println("电压不为5V，不能充电");
        }
    }
}
